#include "techparameter.h"

CTechParameter::CTechParameter(QString name,QString group):
    source(0),
    Name(name),
    group(group),
    status(PS_UNKNOWN),
    isAlarm(true){}


void CTechParameter::setSource(FDataSource* src)
{
    source = src;
};

void CTechParameter::update()
{
    status = PS_UNKNOWN;
    if (!source) return;

    status = PS_INVALID;
    CValue cv = source->readValue();
    if (cv.getStatus() != VS_Normal) return;
    value = cv.getValue();
    status = PS_NORMAL;
}

